package com;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Demo07 {
    public static void main(String[] args) {
        Date date=new Date();
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH-mm-ss");
        String s = simpleDateFormat.format(date);
        System.out.println(s);

        String s1 = date.toString();
        System.out.println(s1);

        long s2 =System.currentTimeMillis();



    }
}
